package com.aizuda.boot.modules.business.performancePlan.dto;

import com.aizuda.boot.modules.common.constant.enums.CollectionIntervalTypeEnum;
import com.aizuda.boot.modules.common.constant.enums.PaymentTimeTypeEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.NotNull;
import java.time.LocalDate;

/**
 * 收款计划明细项 DTO
 */
@Data
@Schema(description = "收款计划明细项")
public class CollectionPlanItemDTO {

    @Schema(description = "排序")
    private Integer sort;

    @Schema(description = "履约类型（0=无收款，1=有收款）")
    private Integer fulfillmentType;

    @Schema(description = "履约事项")
    private String fulfillmentItem;

    @Schema(description = "收款时间类型（固定收款日期、无固定日期、履约完成后）")
    @NotNull(message = "收款时间类型不能为空")
    private PaymentTimeTypeEnum collectionTimeType;

    @Schema(description = "收款日期（若为固定时间类型）")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate collectionDate;

    @Schema(description = "收款金额")
    @NotNull(message = "收款金额不能为空")
    private Integer collectionAmount;

    @Schema(description = "货币类型（如CNY、USD等）")
    private String currencyType;

    @Schema(description = "交易方ID")
    private Integer partnerId;

    @Schema(description = "收款对象ID")
    private Integer collectionReceiverId;

    @Schema(description = "收款对象")
    private String collectionReceiver;

    @Schema(description = "收款说明")
    private String collectionNote;

    @Schema(description = "收款间隔")
    private Integer collectionInterval;

    @Schema(description = "收款间隔类型（自然日、工作日）")
    private CollectionIntervalTypeEnum collectionIntervalType;
}
